import java.math.BigInteger;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        BigInteger a,b;
        BigInteger[] fibs=new BigInteger[1000];
        fibs[0]=new BigInteger("1");
        fibs[1]=new BigInteger("2");
        for(int i=2;i<1000;i++){
            fibs[i]=fibs[i-2].add(fibs[i-1]);
        }
        while(scanner.hasNext()){
            a=scanner.nextBigInteger();
            b=scanner.nextBigInteger();
            if(a.compareTo(BigInteger.ZERO)==0 && b.compareTo(BigInteger.ZERO)==0){
                break;
            }
            int ans=0;
            for(int i=0;i<1000;i++){
                if(fibs[i].compareTo(a)!=-1 && fibs[i].compareTo(b)!=1){
                    ans++;
                }
            }
            System.out.println(ans);
        }
    }
}